package com.mxchip.livestarmobile.mobile.util;

import com.mxchip.livestarmobile.mobile.ui.call.AVPacket;

import org.jetbrains.annotations.NotNull;

public class SendAudioUtil {
    private SendAudioUtil() {
    }

    static SendAudioUtil util = new SendAudioUtil();

    public static SendAudioUtil getInstance() {
        return util;
    }

    public void putSendData(@NotNull AVPacket data) {
        if (getAudioData != null)
            getAudioData.getAudioData(data);
    }

    private GetAudioData getAudioData;

    public void setGetAudioData(GetAudioData getAudioData) {
        this.getAudioData = getAudioData;
    }

    public void clear() {
        getAudioData = null;
    }

    public interface GetAudioData {
        void getAudioData(AVPacket data);
    }


}
